using System;
namespace SoftwareMonkeys.Scriptech.Projects
{
	public class ProjectAssembly
	{
		private string name = String.Empty;
		/// <summary>
		/// Gets/sets the name of the assembly.
		/// </summary>
		public string Name
		{
			get { return name; }
			set { name = value; }
		}
				
		private string directory = String.Empty;
		/// <summary>
		/// Gets/sets the directory containing the assembly.
		/// </summary>
		public string Directory
		{
			get {
				// If no directory is specified then use the assembly name instead
				if (directory == String.Empty)
					return Name;
				return directory; }
			set { directory = value; }
		}
		
		private string[] referencedAssemblies = new string[] {};
		/// <summary>
		/// Gets/sets a list of referenced assemblies. Note: Assemblies refer to those within the same project NOT related libraries from other projects.
		/// </summary>
		public string[] ReferencedAssemblies
		{
			get { return referencedAssemblies; }
			set { referencedAssemblies = value; }
		}	
		
		private string[] referencedLibraries = new string[] {};
		/// <summary>
		/// Gets/sets a list of referenced libraries. Note: Libraries refer to external libraries NOT related assemblies within the same project.
		/// </summary>
		public string[] ReferencedLibraries
		{
			get { return referencedLibraries; }
			set { referencedLibraries = value; }
		}	
		
		private string baseNamespace = String.Empty;
		/// <summary>
		/// Gets/sets the base namespace of the assembly.
		/// </summary>
		public string BaseNamespace
		{
			get { return baseNamespace; }
			set { baseNamespace = value; }
		}
		
		private string outputFileName = String.Empty;
		/// <summary>
		/// Gets/sets the output file name (eg. [Namespace].dll).
		/// </summary>
		public string OutputFileName
		{
			get {
				// If no output file name is specified then generate one automatically based on the BaseNamespace
				if (outputFileName == String.Empty)
					return BaseNamespace + ".dll";
				return outputFileName.Replace("${Assembly.BaseNamespace}", BaseNamespace); }
			set { outputFileName = value; }
		}
		
		public ProjectAssembly ()
		{
		}
	}
}

